'use strict'
let mongoose = require('mongoose')
let Schema = mongoose.Schema
let ObjectId = Schema.ObjectId

//用来自增id
let IdsSchema = new Schema({
    _id: Number,
    userId: Number,
    playerId: Number, //记录玩家自增长id
    serverId: Number, //服务器id
    mailId: Number,
    tradeId: Number,
})

IdsSchema.statics.findAndModify = function(query, sort, doc, options, callback) {
    return this.collection.findAndModify(query, sort, doc, options, callback);
};

mongoose.model('Ids', IdsSchema);